//
//  LogCatScreenHelper.m
//  LogCat
//
//  Created by 清风徐来 on 2023/12/15.
//

#import "LogCatScreenHelper.h"

@implementation LogCatScreenHelper

+ (CGFloat)getStatusBarHeight {
    CGFloat statusBarHeight = 0.0;
    if (@available(iOS 11.0, *)) {
        statusBarHeight = [[UIApplication sharedApplication] delegate].window.safeAreaInsets.top;
    } else {
        statusBarHeight = [UIApplication sharedApplication].statusBarFrame.size.height;
    }
    return statusBarHeight;
}

+ (CGFloat)getNaviagtionBarHeight {
    CGFloat statusBarHeight = [self getStatusBarHeight];
    return statusBarHeight + 44;
}

+ (CGFloat)getSafeAreaBottom {
    UIWindow *keyWindow = [[[UIApplication sharedApplication] delegate] window];
    return keyWindow.safeAreaInsets.bottom;
}

@end
